package br.urca.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "result")
public class SituacaoDisciplina {
	
	@Id
	@Column(name = "cdres", columnDefinition = "CHAR(2)")
	private String codSituacao;
	
	@Column(name = "nores", columnDefinition = "VARCHAR(30)")
	private String descricao;
	
	@Column(name = "acao", columnDefinition = "CHAR(1)")
	private String acao;
	
	public SituacaoDisciplina(){ }

	public String getCodSituacao() {
		return codSituacao;
	}

	public void setCodSituacao(String codSituacao) {
		this.codSituacao = codSituacao;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public String getAcao() {
		return acao;
	}

	public void setAcao(String acao) {
		this.acao = acao;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((acao == null) ? 0 : acao.hashCode());
		result = prime * result
				+ ((codSituacao == null) ? 0 : codSituacao.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SituacaoDisciplina other = (SituacaoDisciplina) obj;
		if (acao == null) {
			if (other.acao != null)
				return false;
		} else if (!acao.equals(other.acao))
			return false;
		if (codSituacao == null) {
			if (other.codSituacao != null)
				return false;
		} else if (!codSituacao.equals(other.codSituacao))
			return false;
		return true;
	}
	
	
	
}
